<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return redirect('/home/index/index');
});

/*  陈  */


// 购物车相关
Route::controller('home/cart','home\CartController');

// 前台团购
Route::controller('home/tuan','home\TuanController');

// 前台评论
Route::controller('home/comment','home\CommentController');

// 收藏管理
Route::controller('home/collect','home\CollectController');

// 地址管理
Route::controller('home/address','home\AddressController');

// 获得单日销售数据
Route::post('admin/stat/dd','admin\StatController@dd');


/*  陈 end */

/*  姚  */


//创建一个前台订单路由
ROute::controller('/home/order','home\OrderController');


//创建一个权限路由
Route::group(['middleware'=>'login'],function(){
	
	//创建一个后台订单路由
	ROute::controller('/admin/order','admin\OrderController');

	//创建一个后台轮播路由
	Route::controller('admin/lunbo','admin\LunboController');

	// 后台评论管理
	Route::controller('admin/comment','admin\CommentController');
	
	// 后台团购管理
	Route::controller('admin/tuan','admin\TuanController');

	// 连接管理
	Route::controller('admin/ad','admin\AdController');

	//管理分类的隐式路由

	Route::controller('/cate','admin\CateController');

	// 数据统计
	Route::get('admin/stat','admin\StatController@stat');
	

	// //管理后台商品的隐式路由
	Route::controller('/admin/goods','admin\GoodsController');


	Route::group(['middleware'=>'auth1'],function(){
		//创建后台用户路由
		Route::controller('/admin/home_user','admin\Home_userController');

		//创建一个管理员路由
		Route::controller('admin/admin_user','admin\Admin_userController');

	});

});

/*  姚 end */

/*  程  */
// Route::controller('/user','admin\UserController');

//管理登陆的隐式路由
Route::controller('/login','admin\LoginController');

//管理验证码的隐式路由
Route::controller('/code','admin\CodeController');

//管理前台注册的隐式路由
Route::controller('/zhuce','home\ZhuceController');

//管理前台登录的隐式路由
Route::controller('/home/login','home\LoginController');

//管理前台个人中心的隐式路由
Route::controller('/home/self','home\SelfController');

//管理前台商品列表的隐式路由
Route::controller('/home/goods','home\GoodsController');

//管理前台商品详情页的隐式路由
Route::controller('/home/detail','home\DetailController');

//管理前台ajax验证s
Route::controller('/ajax','home\AjaxController');

//管理前台主页的隐式路由
Route::controller('/home/index','home\IndexController');

// Route::get('/admin/user/',)

// /*  程 end  */
